<?php

namespace App\Console\Commands\Tools\Menus;

use App\Kuafu\Mqtt\Service\MqttQueueService;
use App\Kuafu\Pay\BasePay;
use App\Kuafu\Pay\Channel\FuYou\FuYouBase;
use App\Kuafu\Pay\Service\PayService;
use App\Kuafu\Product\Enum\ProductCacheEnum;
use App\Kuafu\Product\Model\Product;
use App\Kuafu\ProductMenu\Model\ProductMenu;
use App\Kuafu\Shop\Enum\ShopCacheEnum;
use App\Kuafu\Shop\Model\Shop;
use App\Kuafu\Shop\Service\ShopCameraSyncService;
use App\Kuafu\Shop\Service\ShopService;
use App\Kuafu\WaiMai\Enum\WaiMaiDBEnum;
use App\Kuafu\WaiMai\Model\WaiMaiShopMappingModel;
use App\Library\FeiShu\SendFs;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;

class RefreshMenusCacheCommand extends Command
{

    protected $signature = 'tools:refresh-menus-cache';


    protected $description = '刷新门店菜单缓存';

    public function handle()
    {
        // 更新门店菜品缓存
        $list = ProductMenu::query()->get();

        foreach ($list as $value) {
            Cache::forget(ProductCacheEnum::getProductList($value['id']));
        }

        Cache::forget(ShopCacheEnum::getCustomShopProductStatus(14497));
    }
}
